<script lanuage='javascript'>
/*$(document).ready(function(){
    $('#registerBtn').bind('click',function(event){
        if( !checkUserName() ){
            return false;
        }
        if( !checkMobile() ){
            return false;
        }

        if( !checkPWD() ){
            return false;
        }

        if( !checkRepeatPassword() ){
            return false;
        }

        if( !chekEmail() ){
            return false;
        }
       $('#form1').submit();

    })


});*/
$(function(){
    var items_array2 = [
            { id:"UserUsername",type:'alphaNumeric',require:true,simple:"用户名",focusMsg:'4-20个字符,字母和数字及下划线的组合',ajax:{method:'post',url:'/users/checkUsername',success_msg:'恭喜！用户名可用',failure_msg:'用户名已存在'}},
            { id:"UserMobilephone",type:'telephone',require:true,simple:"手机号码名",focusMsg:'手机号码是花集与您联系的重要方式。'},
            { id:"UserPassword",type:'password',require:true,simple:"密码",focusMsg:'最小长度:6 最大长度:16'},
            { id:"repeat_password",type:'eq',to:'UserPassword',require:true,simple:"确认密码",focusMsg:'请再输入一遍您上面填写的密码'},
            { id:"UserEmail",type:'email',simple:"Email地址",focusMsg:'花集会员优惠活动将通过email告知'},
            { id:"UserFlowershopNum",type:'flowershopNum',simple:"花店号",focusMsg:'推荐您注册的花店唯一号 如:1199530095'},

            //{ name:"confirm_password",type:'eq',to:'password',simple:"确认密码",focusMsg:'请再输入一遍您上面填写的密码'},
           // { name:"email",type:"mail",simple:"Email",focusMsg:'请填写真实并且最常用的邮箱'}
    ];

    $("#form1").skygqCheckAjaxForm({
        items: items_array2
    });
});

</script>
<div id="region2" class="grid1col"><div id="reg_content">
	<div id="ul">
		<div class="li01"><strong>新用户注册</strong></div>
		<div class="li02"></div>
		<div class="li03"></div>
	</div>

  	<div class="ret_content_middle">
            <table class="table">
                <tr>
                <td width="16"><hr /></td>
                <td width="113" class="text_3db7e6"><strong>请填写详细信息</strong></td>
                <td width="520"><hr /></td>
                </tr>
            </table>
<?php echo $this->Form->create('users',array('action'=>'/doRegister','method'=>'POST','id'=>'form1','name'=>'form1','encoding' => null,'inputDefaults'=>array('label'=>false,'div'=>false)))?>
	    <table class="table">
          <tr>
            <td width="9" height="50" align="right"></td>
            <td width="123" align="right"><span class="text_FF3300">*</span>用户名：</td>
            <td>
                <?php echo $form->input('User.username',array('class'=>'sinput','maxlength'=>20,'size'=>30));?>
                <!---<input type="text" size="30" class="sinput" name="user_name" id="user_name" onblur="checkUserName(this.value)" onkeyup="CtoH(this)"/>--->
                <span id="form1tip_UserUsername" class="tip_msg">4-20个字符,字母和数字及下划线的组合</span>
            </td>
          </tr>
          <tr>
            <td height="50"></td>
            <td align="right"><span class="text_FF3300">*</span>手机号码：</td>
            <td>
            <?php echo $form->input('User.mobilephone',array('class'=>'sinput','maxlength'=>11,'size'=>30));?>
            <!---<input name="mobile" id="mobile" type="text" size="30" class="sinput" dataType="int" onblur="checkMobile(this.value)" onkeyup="CtoH(this)"/>--->
            <span id="form1tip_UserMobilephone" class="tip_msg">手机号码是花集与您联系的重要方式。</span></td>
          </tr>
          <tr>

            <td height="50"></td>
            <td align="right"><span class="text_FF3300">*</span>密 码：</td>
            <td>
                <?php echo $form->input('User.password',array('class'=>'sinput','maxlength'=>16,'size'=>30));?>
                <span id="form1tip_UserPassword" class="tip_msg">最小长度:6 最大长度:16</span>
          </td>
          </tr>
          <tr>

            <td height="50"></td>
            <td align="right"><span class="text_FF3300">*</span>重复密码：</td>
            <td>
                <?php //echo $form->input('User.repeat_password',array('class'=>'sinput','onblur'=>'checkRepeatPassword(this.value)','maxlength'=>16,'size'=>30));?>
                <input name="repeat_password" id="repeat_password" type="password" size="30" class="sinput"  maxlength='16'/>
                <span id="form1tip_repeat_password" class="tip_msg">请再次输入密码。</span></td>
          </tr>
          <tr>
            <td height="50"></td>
            <td align="right"><strong style="font-size:12px; color:#3db7e6;">　(选填)</strong>推荐花店号：</td>
            <td>
                <?php echo $form->input('User.flowershop_num',array('class'=>'sinput','maxlength'=>10,'size'=>30));?>
                <span id="form1tip_UserFlowershopNum" class="tip_msg">推荐您注册的花店唯一号 如:1199530095</span></td>
          </tr>
          <tr>
            <td height="50"></td>
            <td align="right"><strong style="font-size:12px; color:#3db7e6;">　(选填)</strong>Email地址：</td>
            <td>
                <?php echo $form->input('User.email',array('class'=>'sinput','maxlength'=>64,'size'=>30));?>
                <span id="form1tip_UserEmail" class="tip_msg">花集会员优惠活动将通过email告知</span></td>
          </tr>

          <tr>
            <td height="70" colspan="3" align="center">
                <!---<input type="button" value="" id="registerBtn" class="sbtn" style="background-image:url(/img/button.jpg); width:171px; height:32px; border:0; cursor:pointer" width="171" height="32"/>--->
                <?php echo $form->submit("/img/button.jpg");?>
            </td>
          </tr>
        </table>
<?php echo $this->Form->end();?>
  	</div>
	<div class="ret_foot"></div>
</div>
</div>